#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
void setZeroes(int(*matrix)[3], int matrixSize, int* matrixColSize) {
    int n = *matrixColSize;
    int arr[201][201] = { 0 };
    
    for (int i = 0; i < matrixSize; i++)
    {
        for (int j = 0; j < n; j++)
        {
            if (matrix[i][j] == 0)
            {
                arr[i][j] = 1;
            }
        }
    }

    for (int i = 0; i < matrixSize; i++)
    {
        for (int j = 0; j < n; j++)
        {
            if (arr[i][j] == 1)
            {
                for (int k = 0; k < matrixSize; k++)
                {
                    matrix[k][j] = 0;
                }
                for (int k = 0; k < n; k++)
                {
                    matrix[i][k] = 0;
                }
            }
        }
    }

}
void Print(int matrix[3][4], int matrixSize, int matrixColSize)
{
    for (int i = 0; i < matrixSize; i++)
    {
        for (int j = 0; j < matrixColSize; j++)
        {
            printf("%d ", matrix[i][j]);
        }
        printf("\n");
    }
}
int main()
{
    int arr[3][4] = {
        {0,1,2,0},
        {3,4,5,2},
        {1,3,1,5}
    };
	//[[0,1,2,0],[3,4,5,2],[1,3,1,5]]
    int p = 4;
    int c = 3;
    Print(arr, c, p);
    setZeroes(arr, c, &p);
    Print(arr, c, p);
    

	return 0;
}
